/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package negocio.dao;

import java.sql.SQLException;
import java.util.List;
import negocio.Usuario;
import org.hibernate.Query;

/**
 *
 * @author Javier
 */
public class LoginDAO extends DAO {

    public LoginDAO() {
        super();
    }

    public Usuario read(String email, String pass) throws SQLException {
        hSession.clear();
        Query q = hSession.createQuery("from Usuario where email='" + email + "' AND pass='" + pass + "'");
        Usuario u = (Usuario) q.uniqueResult();
        return u;
    }
}
